#include "edaFitContinue.h"

edaFitContinue::edaFitContinue(double _fitness) 
  : fitness (_fitness)
{
}

edaContinue *edaFitContinue::clone() const
{
  return new edaFitContinue(fitness);
}

void edaFitContinue::init()
{
}

bool edaFitContinue::check(edaSolution &sol)
{
  return sol.fullEvaluate() < fitness;
}

void edaFitContinue::Serialize(edaBuffer &buf, bool pack)
{
  edaContinue::Serialize(buf, pack);
  if (pack)
  {
    buf.Pack(&fitness, 1);
  }
  else
  {
    buf.UnPack(&fitness, 1);
  }
}
